package Application;

import android.app.Activity;
import android.app.Application;

import java.util.ArrayList;
import java.util.List;
import util.CommonMethod;
import util.LoginInfo;

/**
 * HRTApplication，用户登录成功后，保存服务器返回的数据
 *
 * @author LZ
 */
public class HRTApplication extends Application{

    private LoginInfo loginInfo;
    public static boolean isLoginSuccess;
    public LoginInfo getLoginInfo() {
        return loginInfo;
    }
    public void setLoginInfo(LoginInfo loginInfo) {
        this.loginInfo = loginInfo;
    }
    private static HRTApplication instance = new HRTApplication();
    public static String cache_root_path = "";
    //存放所有的被开启的activity
    public List<Activity> activies;

    public static HRTApplication getInstance(){
        return instance;
    }
    @Override
    public void onCreate() {
        // TODO Auto-generated method stub
        activies = new ArrayList<Activity>();
        super.onCreate();
        instance = this;
        cache_root_path = CommonMethod.getDiskCacheDir(this, "files").getAbsolutePath();
    }
}